package com.hljx.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hljx.dto.*;
import com.hljx.entity.AccountingUnitWeight;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hljx.vo.AccountingVO;
import jakarta.servlet.http.HttpServletResponse;

import java.util.List;

/**
 * <p>
 * 核算单元权重配置表 服务类
 * </p>
 *
 * @author gx
 * @since 2023-10-07
 */
public interface AccountingUnitWeightService extends IService<AccountingUnitWeight> {

    /**
     * 查询该核算周期未添加权重的核算单元
     * @param assessmentCycleId
     * @return
     */
    List<AccountingVO> listAccountingVO(Long assessmentCycleId);

    /**
     * 保存核算单元权重
     * @param accountingUnitWeightDTO
     * @return
     */
    Boolean saveAccountingUnitWeight(AccountingUnitWeightDTO accountingUnitWeightDTO);

    /**
     * 分页查询核算单元权重配置
     * @param accountingUnitWeightPageDTO
     * @return
     */
    IPage<AccountingUnitWeight> listAccountingUnitWeightByPage(AccountingUnitWeightPageDTO accountingUnitWeightPageDTO);

    /**
     * 归档状态
     * @param id
     * @return
     */
    Integer isFile(Long id);

    /**
     * 编辑核算单元权重
     * @param accountingUnitWeightDTO
     * @return
     */
    Boolean updateAccountingUnitWeight(AccountingUnitWeightDTO accountingUnitWeightDTO);

    /**
     * 继承核算单元权重
     * @param inheritAccountingUnitWeightDTO
     * @return
     */
    Boolean inheritAccountingUnitWeight(InheritAccountingUnitWeightDTO inheritAccountingUnitWeightDTO);

    /**
     * 导出和下载模板
     * @param dto
     * @param response
     */
    void export(ExportAccountingUnitWeight dto, HttpServletResponse response) throws ClassNotFoundException;

}
